8.1 Linux SDK Architecture Overview

Figure 8-1 shows the architecture overview of the Linux Software Development Kit (SDK).

Figure 8-1 Linux SDK Architecture Overview

The bl32.bin is a secure stage 3-2 bootloader, which makes Linux kernel execute after performing the following tasks:

  • A very early platform-specific architectural setups, such as the platform-specific memory map

  • Ensures the MMU is initialized and enabled

  • Initializes the GICv2 driver for interrupts

  • Enables the system-level generic timer

  • Configures the external OSPI NOR flash XIP mode

The Linux kernel is the main component of a Linux Operating System (OS) and serves as the core interface between device hardware and user-space applications. The requests from user-space applications are serviced by the Linux kernel and its drivers efficiently through system calls.

The scheduler and any architecture-specific code of the Linux kernel schedule user-space processes to execute on the Cortex-A32 CPU in the APSS. The memory manager of the Linux kernel sets up memory management by mapping the physical addresses of SRAMs (Static Random-Access Memory) to a larger virtual address, which allows multiple and large user-space applications to run seamlessly. Various Linux device drivers allow access and control over the functionality of the various peripheral devices, such as UART, Ethernet, and USB. The Linux filesystem is used to handle the data management of the storage. It helps arrange the files and directories on storage mediums, such as SD card and OSPI NOR flash. It manages the file name, file size, creation date, and various other information about a file. The Linux kernel mounts the filesystem, which is a structured and hierarchal collection of files, and which contains the root directory (/) and its subdirectories. The user-space applications and the system libraries required to run the applications are also part of the filesystem.

Figure 8-2 shows the build flow of the APSS Linux project for creating images for the APSS.

Figure 8-2 APSS Linux Project Build Flow

The APSS Linux project uses the Yocto project, an open-source project focused on creating embedded Linux distributions to build images for the APSS in the DevKit/AppKit device. It uses the OpenEmbedded build system and the BitBake tool to create Linux images. OpenEmbedded is a build automation framework and cross-compilation environment used to create Linux distributions for embedded devices. BitBake is a generic task execution engine that allows shell and Python tasks to be run efficiently and in parallel, while working within complex inter-task dependency constraints.

The following are the output images for the APSS generated from the APSS Linux project:

  • bl32.bin: The secure stage 3-2 bootloader, gives control to execute Linux kernel.
  • devkit-<device>.dtb/appkit-<device>.dtb: The Linux device tree used by the kernel, for example devkit-e7.dtb/appkit-e7.dtb.
  • xipImage: The Linux kernel image used in the APSS of the DevKit/AppKit device is an XIP image (xipImage). The XIP is a method, where the Linux kernel and applications are allowed to run from non-volatile storage directly addressable by the CPU, such as NOR flash, instead of copying the code to RAM.
  • Filesystem: A structured and hierarchal collection of files, which can be of the following formats:
    • cramfs-xip: The cramfs is a read-only Linux filesystem designed to be simple, small, and efficient in compression. The cramfs-xip filesystem can flag individual files/applications to be run as XIP directly from the storage medium, assuming the filesystem image was stored in linear accessible memory, such as NOR flash or ROM. This filesystem can be directly mounted from an NVM to boot a Tiny Linux Distribution or run custom user-space applications on the APSS.
    • ext4: The ext4 is the default filesystem for many Linux distributions. A requirement for read-write (R/W) filesystem is fulfilled by ext4. An external memory device, such as SDMMC, is programmed with an ext4 filesystem to boot a user-specific read/write Linux distribution.

For more details on the APSS Linux project, refer to User Guide Getting Started with Linux available on the Alif Semiconductor User Guides & App Notes page.